***** H1 - Children hypothesis - PID - categorical

* Produce Table 1 in Appendix K - Children hypothesis controlling for incumbecy (categorical)

			***** Children hypothesis controlling for incumbency (categorical)
				
		cd "${data}"	
		
		use data_ess.dta, clear		
		
				* Define significance stars
		graph set window fontface "Arial Narrow"
		global stars "+ 0.10 * 0.05 ** 0.01 *** 0.001"
		
				* Declare survey design for dataset
		svyset, clear 
		svyset country_code [weight=pspwght], strata(essround)
		
		
				* Economy 
				
		eststo clear
		
	eststo m1: svy: reg stfeco i.dummy_parents agea income i.unemployed education i.at_school b0.incumbent_3cat i.essround i.country_code if agea<=34
		
	eststo m2: svy: reg stfeco i.dummy_parents##c.agea income i.unemployed education i.at_school b0.incumbent_3cat  i.essround i.country_code if agea<=34
		
	eststo Economy: svy: reg stfeco i.dummy_parents##c.agea income i.unemployed education i.at_school b0.incumbent_3cat unemployment_rate i.essround i.country_code if agea<=34

			
			
				* Government 
			
	eststo m4: svy: reg stfgov i.dummy_parents agea income b0.unemployed education i.at_school b0.incumbent_3cat i.essround i.country_code if agea<=34
		
	eststo m5: svy: reg stfgov i.dummy_parents##c.agea income b0.unemployed education i.at_school b0.incumbent_3cat  i.essround i.country_code if agea<=34
		
	eststo Government: svy: reg stfgov i.dummy_parents##c.agea income b0.unemployed education i.at_school b0.incumbent_3cat unemployment_rate i.essround i.country_code if agea<=34
	
				
	
	esttab m1 m2 Economy m4 m5 Government using ${tables}/appendixK, ///
			nomtitles booktabs replace ///
			indicate("Country FE = *.country_code" "Year FE = *.essround", labels("\checkmark" "")) ///
			stats(N r2, fmt(%9.0fc %9.2fc) labels("Observations" "R-squared")) ///
			nobaselevels interaction("\$\times\$") substitute("=1" "") nogap compress nonotes b(2) se(2)   starlevels( ${stars}) label mlabels("Model 1" "Model 2" "Model 3" "Model 4" "Model 5" "Model 6") 
